package cn.brilliantfuture.commentry.entity;

// Generated 2012-7-16 16:25:58 by Hibernate Tools 3.3.0.GA

import static javax.persistence.GenerationType.IDENTITY;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

import org.hibernate.validator.NotNull;

/**
 * AdvertInfoPubGroup generated by hbm2java
 */
@Entity
@Table(name = "advert_info_pub_group", catalog = "cabinet")
public class AdvertInfoPubGroup implements java.io.Serializable {

	private static final long serialVersionUID = 1L;
	private Integer advertInfoPubGorupId;
	private AdvertInfo advertInfo;
	private AdvertPubGroup advertPubGroup;
	private Date insertTime;
	private int insertUser;

	public AdvertInfoPubGroup() {
	}

	public AdvertInfoPubGroup(AdvertInfo advertInfo, AdvertPubGroup advertPubGroup, Date insertTime, int insertUser) {
		this.advertInfo = advertInfo;
		this.advertPubGroup = advertPubGroup;
		this.insertTime = insertTime;
		this.insertUser = insertUser;
	}

	@Id
	@GeneratedValue(strategy = IDENTITY)
	@Column(name = "advert_info_pub_gorup_id", unique = true, nullable = false)
	public Integer getAdvertInfoPubGorupId() {
		return this.advertInfoPubGorupId;
	}

	public void setAdvertInfoPubGorupId(Integer advertInfoPubGorupId) {
		this.advertInfoPubGorupId = advertInfoPubGorupId;
	}

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "insert_time", nullable = false, length = 19)
	@NotNull
	public Date getInsertTime() {
		return this.insertTime;
	}

	public void setInsertTime(Date insertTime) {
		this.insertTime = insertTime;
	}

	@Column(name = "insert_user", nullable = false)
	public int getInsertUser() {
		return this.insertUser;
	}

	public void setInsertUser(int insertUser) {
		this.insertUser = insertUser;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "advert_info_id", nullable = false)
	@NotNull
	public AdvertInfo getAdvertInfo() {
		return advertInfo;
	}

	public void setAdvertInfo(AdvertInfo advertInfo) {
		this.advertInfo = advertInfo;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "advert_pub_group_id", nullable = false)
	@NotNull
	public AdvertPubGroup getAdvertPubGroup() {
		return advertPubGroup;
	}

	public void setAdvertPubGroup(AdvertPubGroup advertPubGroup) {
		this.advertPubGroup = advertPubGroup;
	}
}
